package com.education.platform.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 学生信息表
 *
 * @author education-platform
 * @since 2024-09-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("student")
public class Student {

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 家长ID
     */
    @TableField("parent_id")
    private Long parentId;

    /**
     * 学生姓名
     */
    @TableField("name")
    private String name;

    /**
     * 性别
     */
    @TableField("gender")
    private String gender;

    /**
     * 年龄
     */
    @TableField("age")
    private Integer age;

    /**
     * 年级
     */
    @TableField("grade")
    private String grade;

    /**
     * 学校
     */
    @TableField("school")
    private String school;

    /**
     * 薄弱科目
     */
    @TableField("weak_subjects")
    private String weakSubjects;

    /**
     * 学习特点
     */
    @TableField("learning_style")
    private String learningStyle;

    /**
     * 性格特点
     */
    @TableField("personality")
    private String personality;

    /**
     * 兴趣爱好
     */
    @TableField("hobbies")
    private String hobbies;

    /**
     * 学习目标
     */
    @TableField("learning_goals")
    private String learningGoals;

    /**
     * 家长期望
     */
    @TableField("parent_expectations")
    private String parentExpectations;

    /**
     * 创建时间
     */
    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    /**
     * 更新时间
     */
    @TableField(value = "updated_at", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;

    // 枚举定义
    public enum Gender {
        MALE("男"),
        FEMALE("女");

        private final String description;

        Gender(String description) {
            this.description = description;
        }

        public String getDescription() {
            return description;
        }
    }
} 